var i;
Object.defineProperty(exports, "__esModule", {
  value: true
});
var EventManager = require("AA_EventManager");
var LogManager = require("AA_LogManager");
var ResKeeper = require("AA_ResKeeper");
var _decorator = cc._decorator;
var _ccclass = _decorator.ccclass;
_decorator.property;

var _def_UI_TouchClick = function (e) {
  function _creator() {
    return null !== e && e.apply(this, arguments) || this;
  }
  __extends(_creator, e);
  _creator.prototype.onEnable = function () {
    this.node.children[0].active = false;
    this.node.on(cc.Node.EventType.TOUCH_START, this.onTouchStart, this);
  };
  _creator.prototype.onDisable = function () {
    this.node.off(cc.Node.EventType.TOUCH_START, this.onTouchStart, this);
  };
  _creator.prototype.onTouchStart = function (e) {
    var t = this;
    LogManager.LogMgr.debug("x", e.getLocationX(), "y", e.getLocationY());
    EventManager.EventMgr.dispatchEvent("zuobiaozhuanhuan", e.getLocation(), function (e) {
      var o = t.node.convertToNodeSpaceAR(e);
      t.node.children[0].x = o.x;
      t.node.children[0].y = o.y;
      EventManager.EventMgr.dispatchEvent("clicksend", t.node.children[0]);
    });
  };
  return __decorate([_ccclass], _creator);
}(ResKeeper.default);
exports.default = _def_UI_TouchClick;